<?php 
/**
* 微信小程序index
* @copyright 响响租车
* @version   1.0
*/
namespace app\wxapp\controller;
use app\common\model\Cars;
use app\common\model\Secure;
use app\common\model\Inspect;
use app\common\model\Repair;
use app\common\exception\DefinedException;
use app\common\enums\ResultEnum;
use app\common\utils\ResultVOUtil;
class Index extends Basic
{
    public function index()
    {
    	$data['cars'] = Cars::count();
    	$data['secure'] = Secure::where(['notice'=>1,'warn'=>1])->count();
    	$data['inspect'] = Inspect::scope('InspectNum', time()+25920000)->count();
    	$data['repair'] = Repair::scope('Status')->count();
    	$data['brand'] = Charts::brand();
    	$data['agency'] = Charts::agency();
    	return ResultVOUtil::success($data);
    }	
}
